<ui:component xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<h:panelGroup rendered="#{not unboundedHeight}">
		<style type="text/css">
			.tab_style {
				width:100%;
				height:470px;
				overflow:auto;
			}
		</style>
	</h:panelGroup>
	<h:panelGroup rendered="#{unboundedHeight}">
		<style type="text/css">
			.tab_style {
				width:100%;
			}
		</style>
	</h:panelGroup>
	<rich:tabPanel switchType="client">
		<rich:tab label="#{messages['permit.data']}">
			<div class="tab_style">
				<div align="center">
					<ui:include src="/permits/includes/responsibleUsersIncl.xhtml">
						<ui:param name="permit" value="#{operationPermitHelper.permit}" />
						<ui:param name="roleIdx" value="0" />
					</ui:include>
					
					<br />
					<br />
					
					<strong>#{messages['permit.data']}</strong>
					<rich:separator lineType="solid" />
					<br />
					<ui:include src="inputData/permitDataIncl.xhtml">
						<ui:param name="readonly" value="#{true}" />
					</ui:include>

					<br />
					<br />

					<strong>#{messages['txt.land_uses']}</strong>
					<rich:separator lineType="solid" />
					<br />
					<ui:include src="inputData/landUsesIncl.xhtml">
						<ui:param name="readonly" value="#{true}" />
					</ui:include>

					<br />
					<br />

				</div>
			</div>
		</rich:tab>
		
		<rich:tab label="#{messages['permit.payment_data']}">
			<div class="tab_style">
				<div align="center">
					<ui:include src="/permits/includes/responsibleUsersIncl.xhtml">
						<ui:param name="permit" value="#{operationPermitHelper.permit}" />
						<ui:param name="roleIdx" value="0" />
					</ui:include>
					
					<br />
					<br />
					
					<strong>#{messages['permit.payment_data']}</strong>
					<rich:separator lineType="solid" />
					<br />
					<ui:include src="inputData/proceedDataIncl.xhtml">
						<ui:param name="readonly" value="#{true}" />
					</ui:include>
					
					<br />
					<br />
					
				</div>
			</div>
		</rich:tab>

		<rich:tab label="#{messages['operation_permit.assessments']}" rendered="#{operationPermitHelper.permit.analystUserName != null}">
			<div class="tab_style">
				<div align="center">
					<ui:include src="/permits/includes/responsibleUsersIncl.xhtml">
						<ui:param name="permit" value="#{operationPermitHelper.permit}" />
						<ui:param name="roleIdx" value="1" />
					</ui:include>
					
					<br />
					<br />
					
					<strong>#{messages['operation_permit.assessments']}</strong>
					<rich:separator lineType="solid" />
					<br />
					<ui:include src="inputData/assessmentsIncl.xhtml">
						<ui:param name="readonly" value="#{true}" />
					</ui:include>
				</div>
			</div>
		</rich:tab>
		
		<rich:tab label="#{messages['intro2.attacheddocs']}">
			<div class="tab_style">
				<div align="center">
					<strong>#{messages['intro2.attacheddocs']}</strong>
					<rich:separator lineType="solid" />
					<br />
					<h:form>
						<ui:include src="inputData/attachedFilesIncl.xhtml">
							<ui:param name="readonly" value="#{true}" />
						</ui:include>
					</h:form>
				</div>
			</div>
		</rich:tab>
		
		<rich:tab label="#{messages['operation_permit.approval']}" rendered="#{operationPermitHelper.permit.approverUserName != null}">
			<div class="tab_style">
				<div align="center">
					<ui:include src="/permits/includes/responsibleUsersIncl.xhtml">
						<ui:param name="permit" value="#{operationPermitHelper.permit}" />
						<ui:param name="roleIdx" value="3" />
					</ui:include>
					
					<br />
					<br />
					
					<h:form>
						<ui:include src="inputData/approvalDataIncl.xhtml">
							<ui:param name="readonly" value="#{true}" />
							<ui:param name="hideTitle" value="#{true}" />
						</ui:include>
					</h:form>
				</div>
			</div>
		</rich:tab>
		
	</rich:tabPanel>

</ui:component>
